#ifndef CONSTANTS_H_
#define CONSTANTS_H_

#include "KdNode.h"

//#define USERECURSIVETRAVERSAL
//#define USERECURSIVEBUILD

//#define DEBUG
//#undef NDEBUG

//#define USETEXTURE

const static int X = 0;
const static int Y = 1;
const static int Z = 2;

const static float EPSILON = .001;
const static float MAXFLOAT = 3.40282e+38;

const static float MAXRAYDISTANCE = 10000.;

const static float TRAVERSALCOST = 30.;
const static float INTERSECTCOST = 100.;

const static int MAXTRIANGLESPERKDNODE = 1;
const static int MAXKDTREEDEPTH = 16;

const static int KDTREEMEMORYMANAGER_INITIAL_SIZE = (2<<MAXKDTREEDEPTH) * sizeof(KdNode) * 2; // (2^MAXKDTREEDEPTH) * sizeof(KdNode) * 2
const static int KDTREEMEMORYMANAGER_RESIZE = 2048;

const static int TRIANGLELISTMEMORYMANAGER_INITIAL_SIZE = 190000000;
const static int TRIANGLELISTMEMORYMANAGER_RESIZE = 2048;

const static int NUMBINS = 32;

const static int KDBUILDQUEUESIZE = 2<<MAXKDTREEDEPTH;// 2^MAXTREEDEPTH

const static int RT_SCREENW = 320;
const static int RT_SCREENH = 240;

const static int SUPERSAMPLING = 1;

// lookup table for the modulo3 operation
static const unsigned int modulo3[] =
{ 0, 1, 2, 0, 1 };

#endif /*CONSTANTS_H_*/
